<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta name="referrer" content="never">
    <meta name="robots" content="noindex, nofollow">
    <meta charset="utf-8">
    <title>合同详情</title>
    <script src="/assets/signature/jquery-3.6.0.min.js"></script>
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        iframe {
            border: 0;
            width: 100%;
            height: calc(100vh - 80px);
            /*height: 100vh;*/
        }

        .btns {
            text-align: center;
            height: 80px;
            /*background: red;*/

        }

        button {
            font-size: 20px;
        }

        #signature {
            border: 1px solid #ccc;
            height: 500px;
        }
    </style>
</head>

<body>
<iframe src="https://www.pfile.com.cn/api/profile/onlinePreview?url=https://crm.szhxvip.com/{$package.contract_url}"></iframe>
<div class="btns">
    {if$package && $package.signature_url}
    已完成签名
    {else}
    <button id="com">确定签字</button>
    {/if}
</div>
<script>
    $(function () {
        $('#com').click(() => {
            window.location.href = "{:url('/index/package/details/package_id/'.$package.package_id)}"
        })
    });
</script>
</body>
</html>
